
CREATE TABLE Base_UserGroup
(
	UserGroup_ID VARCHAR2(50) NOT NULL PRIMARY KEY,
	ParentId VARCHAR2(50),
	UserGroup_Code VARCHAR2(50),
	UserGroup_Name VARCHAR2(50),
	UserGroup_Remark VARCHAR2(200),
	AllowEdit INT,
	AllowDelete INT,
	SortCode INT,
	DeleteMark INT DEFAULT(1),
	CreateDate date default(sysdate),
	CreateUserId varchar2(50),
	CreateUserName varchar2(50),
	ModifyDate date,
	ModifyUserId varchar2(50),
	ModifyUserName varchar2(50)
);

/*

CREATE TABLE [dbo].[Base_UserGroup](
	[UserGroup_ID] [dbo].[Name(50)] NOT NULL,
	[ParentId] [dbo].[Name(50)] NULL,
	[UserGroup_Code] [dbo].[Name(50)] NULL,
	[UserGroup_Name] [dbo].[Name(50)] NULL,
	[UserGroup_Remark] [dbo].[Name(200)] NULL,
	[AllowEdit] [dbo].[ID] NULL,
	[AllowDelete] [dbo].[ID] NULL,
	[SortCode] [dbo].[ID] NULL,
	[DeleteMark] [dbo].[ID] NULL,
	[CreateDate] [Date] NULL,
	[CreateUserId] [dbo].[Name(50)] NULL,
	[CreateUserName] [dbo].[Name(50)] NULL,
	[ModifyDate] [Date] NULL,
	[ModifyUserId] [dbo].[Name(50)] NULL,
	[ModifyUserName] [dbo].[Name(50)] NULL,
 CONSTRAINT [PK_BASE_USERGROUP] PRIMARY KEY NONCLUSTERED 
(
	[UserGroup_ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

SET ANSI_PADDING OFF
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'用户组主键' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Base_UserGroup', @level2type=N'COLUMN',@level2name=N'UserGroup_ID'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'父节点主键' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Base_UserGroup', @level2type=N'COLUMN',@level2name=N'ParentId'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'用户组编号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Base_UserGroup', @level2type=N'COLUMN',@level2name=N'UserGroup_Code'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'用户组名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Base_UserGroup', @level2type=N'COLUMN',@level2name=N'UserGroup_Name'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'用户组描述' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Base_UserGroup', @level2type=N'COLUMN',@level2name=N'UserGroup_Remark'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'允许编辑' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Base_UserGroup', @level2type=N'COLUMN',@level2name=N'AllowEdit'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'允许删除' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Base_UserGroup', @level2type=N'COLUMN',@level2name=N'AllowDelete'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'排序吗' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Base_UserGroup', @level2type=N'COLUMN',@level2name=N'SortCode'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'删除标记' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Base_UserGroup', @level2type=N'COLUMN',@level2name=N'DeleteMark'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'创建时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Base_UserGroup', @level2type=N'COLUMN',@level2name=N'CreateDate'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'创建用户主键' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Base_UserGroup', @level2type=N'COLUMN',@level2name=N'CreateUserId'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'创建用户' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Base_UserGroup', @level2type=N'COLUMN',@level2name=N'CreateUserName'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'修改时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Base_UserGroup', @level2type=N'COLUMN',@level2name=N'ModifyDate'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'修改用户主键' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Base_UserGroup', @level2type=N'COLUMN',@level2name=N'ModifyUserId'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'修改用户' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Base_UserGroup', @level2type=N'COLUMN',@level2name=N'ModifyUserName'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'用户组管理' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Base_UserGroup'
GO

ALTER TABLE [dbo].[Base_UserGroup] ADD  CONSTRAINT [DF_Base_UserGroup_DeleteMark]  DEFAULT ((1)) FOR [DeleteMark]
GO

ALTER TABLE [dbo].[Base_UserGroup] ADD  CONSTRAINT [DF_Base_UserGroup_CreateDate]  DEFAULT (getdate()) FOR [CreateDate]
GO

*/